package com.ruoyi.caigou.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.caigou.mapper.BuyComparePriceGoodsMapper;
import com.ruoyi.caigou.domain.BuyComparePriceGoods;
import com.ruoyi.caigou.service.IBuyComparePriceGoodsService;

/**
 * 采购比较的商品详情Service业务层处理
 * 
 * @author lvql
 * @date 2024-11-02
 */
@Service
public class BuyComparePriceGoodsServiceImpl implements IBuyComparePriceGoodsService 
{
    @Autowired
    private BuyComparePriceGoodsMapper buyComparePriceGoodsMapper;

    /**
     * 查询采购比较的商品详情
     * 
     * @param id 采购比较的商品详情主键
     * @return 采购比较的商品详情
     */
    @Override
    public BuyComparePriceGoods selectBuyComparePriceGoodsById(Integer id)
    {
        return buyComparePriceGoodsMapper.selectBuyComparePriceGoodsById(id);
    }

    /**
     * 查询采购比较的商品详情列表
     * 
     * @param buyComparePriceGoods 采购比较的商品详情
     * @return 采购比较的商品详情
     */
    @Override
    public List<BuyComparePriceGoods> selectBuyComparePriceGoodsList(BuyComparePriceGoods buyComparePriceGoods)
    {
        return buyComparePriceGoodsMapper.selectBuyComparePriceGoodsList(buyComparePriceGoods);
    }

    /**
     * 新增采购比较的商品详情
     * 
     * @param buyComparePriceGoods 采购比较的商品详情
     * @return 结果
     */
    @Override
    public int insertBuyComparePriceGoods(BuyComparePriceGoods buyComparePriceGoods)
    {
        return buyComparePriceGoodsMapper.insertBuyComparePriceGoods(buyComparePriceGoods);
    }

    /**
     * 修改采购比较的商品详情
     * 
     * @param buyComparePriceGoods 采购比较的商品详情
     * @return 结果
     */
    @Override
    public int updateBuyComparePriceGoods(BuyComparePriceGoods buyComparePriceGoods)
    {
        return buyComparePriceGoodsMapper.updateBuyComparePriceGoods(buyComparePriceGoods);
    }

    /**
     * 批量删除采购比较的商品详情
     * 
     * @param ids 需要删除的采购比较的商品详情主键
     * @return 结果
     */
    @Override
    public int deleteBuyComparePriceGoodsByIds(Integer[] ids)
    {
        return buyComparePriceGoodsMapper.deleteBuyComparePriceGoodsByIds(ids);
    }

    /**
     * 删除采购比较的商品详情信息
     * 
     * @param id 采购比较的商品详情主键
     * @return 结果
     */
    @Override
    public int deleteBuyComparePriceGoodsById(Integer id)
    {
        return buyComparePriceGoodsMapper.deleteBuyComparePriceGoodsById(id);
    }

    @Override
    public List<BuyComparePriceGoods> selectBuyComparePriceGoodsListByComparePriceCode(List<String> codeList) {
       return buyComparePriceGoodsMapper.selectBuyComparePriceGoodsByComparePriceCode(codeList);
    }
}
